<?php
    $sections = array(array("uri" => "swots.php", "text" => "SWOT-матрица"), array("uri" => "relations.php", "text" => "Матрица взаимоотношений"), array("uri"
            => "result.php", "text" => "Результат"));
?>
<?php for ($i = 0; $i < count($sections); $i++) { ?>
<a href="<?php echo $sections[$i]['uri']; ?>">
    <span class="<?php if (strpos($_SERVER['REQUEST_URI'], $sections[$i]['uri']) !== FALSE) echo "active"; ?>item">
        <?php echo $sections[$i]['text']; ?>
    </span>
</a>
<?php if ($i < count($sections) - 1) echo "→"; ?>
<?php } ?>
